import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {IndexComponent}from "./index/index.component";
import {SpdetailComponent} from "./spdetail/spdetail.component";
import {NewsdetailComponent} from "./newsdetail/newsdetail.component";
import {AudioplayComponent} from "./audioplay/audioplay.component";
import {VideoplayComponent} from "./videoplay/videoplay.component";
//import {from} from "rxjs/index";


const routes: Routes = [
  {path:"index",component:IndexComponent},
  {path:'spdetail',component:SpdetailComponent},
  {path:'newsdetail',component:NewsdetailComponent},
  {path:'audioplay',component:AudioplayComponent},
  {path:'videoplay',component:VideoplayComponent},
  {path:"**",component:IndexComponent}
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
